#pragma once
namespace lht {
	template <class iterator,class Ref,class Ptr>
	class reverse_iterator {
		typedef reverse_iterator<iterator> self;
	public:
		reverse_iterator(iterator it) :_it(it){}

		self& operator ++() {
			--_it;
			return *this;
		}

		Ref operator*() {
			self prev = it;
			return *--prev;
		}
		Ptr operator->() {
			
			return &operator*();
		}

		self& operator --() {
			++_it;
			return *this;
		}

		bool operator!=(const self& it) const{
			return _it != it._it;
		}

	private:
		iterator _it;
	};
}